package com.springcloud.zuul.common.constant;

/**
 * @program: springcloud-zuul
 * @description: 业务异常类
 * @author: zhlu
 * @create: 2019-12-25 19:21
 * @Introduction(说明背景故事)
 **/
public enum ServiceCode {

    /** 用户相关 */
    NEW_USER_SUCCESS("200","账号创建成功，请妥善保管!"),
    COMPANY_USERS("52100","公司用户，所属公司不能为空!"),
    NO_CURRENT_COMPANY_EXISTS("52101","不存在当前所属公司!"),
    NO_CORRESPONDING_PRODUCT_SELECTED("52102","未选择对应的产品!"),
    UNREASONABLE_CHOICE_OF_PERMISSION_FUNCTION("52103","权限功能选择不合理,超出当前范围!"),
    UNREASONABLE_ROLE_SELECTION("52104","角色选择不合理!"),
    PRESENCE_USER("52105","手机号已存在!"),
    PASSWORD_IS_INCORRECT("52106","原密码不正确!"),

    /** token失效 */
    TOKEN_IS_INVALID("52107","token失效，请重新登录!"),
    DOES_NOT_EXIST_USER("52103","用户不存在!"),
    ACCOUNT_PASSWORD_IS_INCORRECT("52104","账号或密码不正确!"),
    ACCOUNT_HAS_BEEN_LOCKED("52105","账号已被锁定,请联系管理员!"),
    VERIFICATION_CODE_INCORRECT("52106","验证码不正确!"),
    ACCOUNT_PASSWORD("52107","账号密码不能为空!"),
    PHONE_CANNOT_BE_EMPTY("52108","手机号不能为空!"),

    MENU_NAME_NOT_NULL("52109","权限功能名称不能为空!"),
    MENU_PARENT_NULL("52110","上级权限功能不能为空!"),
    MENU_URL_NOT_NULL("52111","权限功能URL不能为空!"),
    MENU_PARENT_IS_CATALOG("52112","上级权限功能只能为目录类型!"),
    MENU_PARENT_IS_CARTE("52113","上级权限功能只能为菜单类型!"),
    MENU_PARENT_IS_BUTTON("52114","上级权限功能只能为按钮类型!"),
    MENU_EXISTED("52115","权限功能编码已存在!"),
    THE_SUBMENU_FIRST("52116","请先删除子菜单、按钮、效验、文档相关权限!"),
    MENU_NOT_EXISTED("52116","不存在当前权限信息!"),
    MENU_SUPER_AUTHORITY("52116","是否超级权限不能为空!"),

    PRODUCT_NULL("52117","不存在当前产品信息!"),
    PRODUCT_ID_NULL("52117","产品编码不能为空!"),
    PRODUCT_NAME_NULL("52117","产品名称不能为空!"),
    PRODUCT_PARENT_NULL("52118","父级产品编码不能为空!"),
    NOT_PRODUCT("52119","不存在当前父级产品!"),
    PRODUCT_EXISTED("52120","不存在当前父级产品!"),
    PRODUCT_USER_NULL("52121","产品负责人不能为空!"),
    PRODUCT_USER_EXISTED("52122","产品负责人信息不存在!"),
    PRODUCT_AUTHORITY("52123","产品权限功能不能为空!"),
    PRODUCT_MENU_EXISTED("52124","不存在当前权限功能!");

    private String code;

    private String msg;

    ServiceCode(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
